#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=hplip-plugin_lede
PKG_VERSION:=3.23.8
PKG_RELEASE:=1

#PKG_SRC_NAME:=ghostscript-fonts-std

PKG_SOURCE:=hplip-$(PKG_VERSION)-plugin.run
PKG_SOURCE_URL:=https://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/
PKG_MD5SUM:=6865682b095f8c4500c54b285ff05ef6

include $(INCLUDE_DIR)/package.mk

PKG_UNPACK:=gzip -dc $(DL_DIR)/$(PKG_SOURCE) | $(TAR) -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)

define Package/hplip-plugin_lede
    SECTION:=fonts
    CATEGORY:=Printing
    SUBMENU:=Fonts
    TITLE:=(LEDE) HPlip Plugin
endef

define Package/hplip-plugin/description
	Ghostscript standard fonts.
endef

define Build/Configure
endef

define Build/Compile
endef

define Package/hplip-plugin/install
	$(INSTALL_DIR) $(1)/usr/bin
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/hplip-$(PKG_VERSION)-plugin.run $(1)/usr/bin/hplip-plugin
endef

define Package/hplip-plugin/postinst
#!/bin/sh
[ -z "$$$${IPKG_INSTROOT}" -a -f /usr/bin/fc-cache ] && /usr/bin/fc-cache --force --verbose || exit 0
endef

$(eval $(call BuildPackage,hplip-plugin_lede))

